# 指定基础镜像
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/openjdk:17-slim
# 可选 设置作者信息
LABEL author=zhangming
# 设置挂载点，持久化日志等数据
VOLUME /tmp
ADD mall-search/src/main/resources/es-ca.crt es-ca.crt
RUN keytool -importcert -alias es-cert -file es-ca.crt -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit
# 添加jar包, 并起别名 app.jar
ADD mall-search/target/mall-*.jar app.jar
# 启动命令
ENTRYPOINT ["java","-jar","/app.jar"]